<template>
  <div class="wrapper">
    <div class="headline"></div>
    <div class="subject">
      <div class="top">
        <span>SkateStore.com</span>
      </div>
      <div class="headimg">
        <img src="../../assets/img/headimg .jpg" />
      </div>
      <!-- 导航栏 -->
      <div class="navbar">
        <div class="nav">
          <ul class="menu">
            <li><a href="/index">HOME</a></li>
            <li><a href="/news">NEWS</a></li>
            <li><a href="/store">网上商城</a></li>
            <li><a href="/cart">购物车</a></li>
          </ul>
        </div>
        <!-- 搜索栏 -->
        <div class="search">
          <input type="text" id="s" name="s" v-model="search2" value="" />
          <input
            type="submit"
            id="submit"
            name="submit"
            value="GO"
            style="background='black'"
            @click="search()"
          />
        </div>
      </div>
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
import axios from "axios";
import "../../assets/css/index.css";
export default {
  data() {
    return {
      search2: "",
    };
  },
  methods: {
    search() {
      // console.log(this.search2);
      axios
        .post("http://localhost:8081/home/search", { search2: this.search2 })
        .then((res) => {
          console.log(res);
        });
    },
  },
};
</script>
<style scoped>
.wrapper {
  background-color: black;
  text-align: center;
}
.top {
  text-align: center;
  font-size: 18px;
}
.headline {
  position: absolute;
  top: 21px;
  left: 0;
  height: 13px;
  background: #000;
  width: 100%;
}
.subject {
  width: 940px;
  margin: 0 auto 0;
  padding: 0 15px;
  background: #fff;
}
.content {
  overflow: hidden;
}

.navbar {
  border-bottom: 1px dashed #5a5758;
  margin-top: 10px;
  padding: 5px 0;
  position: absolute;
}

.nav .menu {
  width: 940px;
  float: left;
  display: table;
  zoom: 1;
  z-index: 200;
}
.menu li {
  float: left;
  margin: auto 45px;
}
.search {
  float: right;
  margin-top: -20px;
}
.search #s {
  background: url(../../assets/img/s.gif) left no-repeat;
  border: 1px solid #231f20;
  width: 170px;
  padding-left: 21px;
  height: 19px;
  float: left;
}
.search #submit {
  background: black;
  color: white;
  width: 25px;
  height: 21px;
}
.el-carousel-item {
  height: 400px;
  width: 680px;
  margin: 0;
}
.left {
  width: 680px;

  margin-top: 80px;
}

.img li {
  position: absolute;
  top: 100px;
}

.el-carousel__item {
  height: 400px !important;
}
.homelist {
  margin-top: 15px;
}
.homelist h3 {
  background: #000;
}
.homelist h3 a {
  color: #fff;
}
.homelist .list1 {
  float: left;
  width: 298px;
  border-right: 1px dashed #000;
  padding-right: 41px;
}

.homelist .list2 {
  float: left;
  width: 298px;
  padding-left: 41px;
}
.homelist span {
  width: 300px;
  display: inline-block;
  text-indent: 2em;
}
.homelist h4 {
  text-align: left;
}
.list1con {
  margin-top: 14px;
  margin-left: 0px;
  overflow: hidden;
}
.list2con {
  margin-top: 14px;
  left: 0px;
  overflow: hidden;
}
</style>
